package com.project2.mapper;

import com.project2.bean.bo.CommentListBO;
import com.project2.bean.po.MarketComment;
import com.project2.bean.po.MarketCommentExample;
import com.project2.bean.vo.CommentUserInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface MarketCommentMapper {
    long countByExample(MarketCommentExample example);

    int deleteByExample(MarketCommentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketComment record);

    int insertSelective(MarketComment record);

    List<MarketComment> selectByExample(MarketCommentExample example);

    MarketComment selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketComment record, @Param("example") MarketCommentExample example);

    int updateByExample(@Param("record") MarketComment record, @Param("example") MarketCommentExample example);

    int updateByPrimaryKeySelective(MarketComment record);

    int updateByPrimaryKey(MarketComment record);

    int updateByCommentId(@Param("commentId") Integer commentId, @Param("date") Date date);

    int updateContentByCommentId(@Param("commentId") Integer commentId, @Param("content") String content, @Param("date") Date date);

    Integer countAllCommentByValueIdAndType(@Param("valueId") Integer valueId, @Param("type") Byte type);

    Integer countHasPicCommentByValueIdAndType(@Param("valueId") Integer valueId, @Param("type") Byte type);

    CommentUserInfoVO selectUserInfo(@Param("id") Integer userId);

    List<MarketComment> selectByCondition(@Param("bo") CommentListBO bo);

}